package cn.tedu.basic;

import java.sql.Connection;
import java.sql.DriverManager;

public class JdbcUtils2 {
    public static Connection getConnection() throws Exception {
        Class.forName("com.mysql.jdbc.Driver");
        String url="jdbc:mysql:///jdbctest?characterEncoding=utf8";
        String name="root";
        String pwd="root";
        Connection con = DriverManager.getConnection(url,name,pwd);
        return con;
    }
}
